package com.matrix.java.chap_05;
/*
    模拟：正面或反面
 */
public class Ex5_40 {
    public static void main(String[] args) {
        int leftNum=0;
        int rightNum=0;
        for (int i = 0; i < 100000000; i++) {
            long random = Math.round(Math.random());
            if (random==0){
                leftNum++;
            }else {
                rightNum++;
            }
        }
        System.out.println(leftNum+" "+rightNum);
    }
}
